import java.awt.Point;

public class Armory implements Buildings {

	//No growth for armory's
	public float growth(float curRes) {
		return 0;
	}

	//no building defense for armory's
	public float defend(byte attackMorale, byte ownMorale, byte attackArmory) {
		// some formula to reduce number of residents.
		float reduce = (((float) (attackMorale - ownMorale)) / 5f)
				+ ((float) (attackArmory) / 4f);
		if (reduce < 0) {
			reduce = Math.abs(1 / (reduce - 1));
		} else {
			reduce++;
		}
		return reduce;
	}

	//No upgrade available
	public boolean isUpgradeable(float res) {
		return false;
	}

	public Armory clone() {
		return new Armory();
	}

	public Armory clone(byte level) {
		return new Armory();
	}

	//No ranged effects from armory's
	public void InRange(Point p, Unit u) {
		return;
	}
}
